<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>船期文件管理</title>
    <s:head/>
</head>
<script type="text/javascript">
    var ID = "${declarationInform.sendRemind.id}";
    var formSetting = {
        title: "修改备注",
        module: 'save',
        numCount: 1,

        columns: [{
            name: "declarationInform.sendRemind.expressNo",
            label: "快递单号"
        }, {
            name: "declarationInform.id",
            label: "id",
            hidden: true
        }, {
            name: "declarationInform.sendRemind.expressCompanyName",
            label: "快递公司名"
        }, {
            name: "declarationInform.sendRemind.mailFileContents",
            label: "内容",
            type: "textarea"
        }, {
            name: "declarationInform.sendRemind.remark",
            label: "备注",
            type: "textarea"
        }],
        form: {
            'url': 'sendremind-saveOrUpdate?id=' + ID,
            'data': function () {
                var id = "${declarationInform.id}";
                if (id) {
                    var dataValue = "";
                    $.ajax({
                        url: "declarationInform-find?declarationInform.id="
                        + id,
                        async: false,
                        success: function (data) {
                            dataValue = data;
                        }
                    });
                    return dataValue;
                } else {
                    return null;
                }
            },
// 			afterAjaxSuccess : function(responseText, statusText, xhr, $form) {
// 				if ($.parseJSON(responseText.msg).state == 1) {
// 					window.close();
// // 					$('#center', window.parent.document).attr("src","declarationInform-main");
// // 					jw.close();
// // 					window.location.href = "declarationInform-main";
// 				}
// 			}
            "ajaxForm": {
                success: function () {
                    jw.close();
                }
            }
        },
        buttons: {}
    };
    $(document).ready(function () {
        $("#formtable").mrdForm(formSetting);
    });
</script>
<body>
<div style="width: 100%">
    <div id="formtable"></div>
</div>
</body>
</html>
